a = {}
b = dict()
print(type(a))
print(type(b))

# a = {
#     'id': 1,
#     'name': 'lisi'
# }
# # 判定key
# print(type(a))
# print('id' in a)
# print('name' in a)
# print('id' not in a)

# a = {
#     'id': 1,
#     'name': 'lisi'
# }
# print(a['name'])

# a = {
#     'id': 1,
#     'name': 'lisi'
# }
# a['age'] = 14
# print(a)
# # 删除
# a.pop('age')
# print(a)

# 遍历字典：
a = {
    'id': 1,
    'name': 'lisi'
}

for key in a:
    print(key, a[key])

print(a.keys())
print(a.values())
print(a.items())

# for key,values in a.items():
#     print(key,values)